﻿using YNTK.Common.Const;
using YNTK.Common.Entity;
using SqlSugar;

namespace YNTK.LearningGarden.Entitys
{
    /// <summary>
    /// 学习园地基类
    /// </summary>
    [SugarTable("leran_learninggardens")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class LearningGardenEntity: CLDEntityBase
    {
        /// <summary>
        /// 所属组织id
        /// </summary>
        [SugarColumn(ColumnName = "F_OrganizeId", ColumnDescription = "所属组织id", ColumnDataType = "nvarchar(50)")]
        public string OrganizeId { get; set; }

        /// <summary>
        /// 所属机构id
        /// </summary>
        [SugarColumn(ColumnName = "F_MechanismId", ColumnDescription = "所属机构id")]
        public string MechanismId { get; set; }

        /// <summary>
        /// 学习园地分类id
        /// </summary>
        [SugarColumn(ColumnName = "F_ClassifyId", ColumnDescription = "学习园地分类id")]
        public string ClassifyId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [SugarColumn(ColumnName = "F_Title", ColumnDescription = "标题")]
        public string Title { get; set; }

        /// <summary>
        /// 共享范围(null.完全公开 0.全组织 1.特定机构 2.特定角色 3.特定用户 4.仅自己可见)
        /// </summary>
        [SugarColumn(ColumnName = "F_SharedScope", ColumnDescription = "共享范围(null.完全公开 0.全组织 1.特定机构 2.特定角色 3.特定用户 4.仅自己可见)")]
        public int? SharedScope { get; set; }

        /// <summary>
        /// 共享范围,多个机构/角色/用户按逗号分割,SharedScope为0或4时为空
        /// </summary>
        [SugarColumn(ColumnName = "F_SharedScopeValue", ColumnDescription = "共享范围,多个机构/角色/用户按逗号分割,SharedScope为0或4时为空")]
        public string SharedScopeValue { get; set; }

        /// <summary>
        /// 标签,多个标签按逗号分割
        /// </summary>
        [SugarColumn(ColumnName = "F_Tag", ColumnDescription = "标签,多个标签按逗号分割")]
        public string Tag { get; set; }

        /// <summary>
        /// 浏览次数
        /// </summary>
        [SugarColumn(ColumnName = "F_ViewCount", ColumnDescription = "浏览次数")]
        public int ViewCount { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [SugarColumn(ColumnName = "F_Content", ColumnDescription = "内容")]
        public string Content { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        [SugarColumn(ColumnName = "F_SortCode")]
        public long? SortCode { get; set; }
    }
}
